import { SAVE_USER_INFO, DELETE_USER_INFO } from '../constan';

export const createSaveUserInfoAction = data => {
  localStorage.setItem('user', JSON.stringify(data))
  localStorage.setItem('isLogin', true)
  return { type: SAVE_USER_INFO, data }
}

export const createDeleteUserInfoAction = () => {
  localStorage.removeItem('user')
  localStorage.removeItem('isLogin')
  return { type: DELETE_USER_INFO }
}
